
typedef void (*AudioPCMCallback) (void *userdata, uint8_t *stream, int len);


typedef struct AudioDeviceSpec {
	int freq;			//采样频率
	AVSampleFormat format;		//采样位数格式
	uint8_t channels;		//声道数
	uint16_t samples;		//采样大小
	uint32_t size;			//缓存区大小
	AudioPCMCallback callback;	//音频回调
	void *userdata;			//音频上下文
}AudioDeviceSpec;


class AudioDevice {
	public:
		AudioDevice();
		virtual ~AudioDevice();
		virtual int open(const AudioDeviceSpec *desired, AudioDeviceSpec *obtained);
		virtual void start();
		virtual void stop();
		virtual void pause();
		virtual void resume();
		virtual void flush();
		virtual void setStereoVolume(float left_volume, float right_volume);
};

AudioDevice::AudioDevice() {

}

AudioDevice::~AudioDevice() {

}

int AudioDevice::open(const AudioDeviceSpec *desired, AudioDeviceSpec *obtained) {
    return 0;
}

void AudioDevice::start() {

}

void AudioDevice::stop() {

}

void AudioDevice::pause() {

}

void AudioDevice::resume() {

}

void AudioDevice::flush() {

}

void AudioDevice::setStereoVolume(float left_volume, float right_volume) {

}
